package com.pos43.business.service.impl;

import java.util.List;

import com.pos43.business.dao.IReturnsDao;
import com.pos43.business.dao.IUserDao;
import com.pos43.business.dao.impl.ReturnsDao;
import com.pos43.business.dao.impl.UserDao;
import com.pos43.business.service.IReturnsService;
import com.pos43.domain.Returns;

public class ReturnsService implements IReturnsService{
	
	IReturnsDao returnsDao = new ReturnsDao();
	IUserDao userDao = new UserDao();
	

//	public Integer addReturns(Float summ, Boolean isVip, User user)
	public Integer addReturns(Returns returns){
//		Returns returnsInstance = new Returns();
//		returnsInstance.setAddDate(new Date());
//		returnsInstance.setSumm(summ);
//		returnsInstance.setIsVip(isVip);
//		returnsInstance.setUser(user);
		return returnsDao.save(returns);
	}
	
//	 public void delReturns(Integer returnsId){
//		 returnsDao.delete(returnsId);
//	 }
//	 
//	 public void updateReturns(Returns returns){
//		 returnsDao.update(returns);
//	 }
	 
	 public List<Returns> listReturns(){
		 return returnsDao.findAll();
	 }
	 
	 public Returns getReturns(Integer returnsId){
		 return returnsDao.get(returnsId);
	 }

	public IReturnsDao getReturnsDao() {
		return returnsDao;
	}

	public void setReturnsDao(IReturnsDao returnsDao) {
		this.returnsDao = returnsDao;
	}

	public IUserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}


}
